﻿<!--_meta 作为公共模版分离出去-->
{include file="public/meta" /}
<!--/meta 作为公共模版分离出去-->
<title>会员列表 - 会员管理</title>
</head>
<body>
<div class="wap-container">
    <nav class="breadcrumb" style="background-color:#fff;padding: 0 24px">
        首页
        <span class="c-gray en">/</span>
        会员管理
        <span class="c-gray en">/</span>
        会员签到
        <a class="btn btn-success radius f-r" style="line-height:1.6em;margin-top:3px"
           href="javascript:location.replace(location.href);" title="刷新"><i class="Hui-iconfont">&#xe68f;</i></a>
    </nav>
    <article class="Hui-admin-content clearfix">
        <div class="panel">
            <form class="layui-form layui-form-pane" action="{:url('sign_in')}" method="get">
                <div class="panel-body">
                    <div class="text-c"> 日期范围：
                        <input type="text" name="begin_time" value="{$begin_time}" id="search-datetime-start" class="input-text datetimepicker-input"
                               style="width:120px;">
                        -
                        <input type="text" name="end_time" value="{$end_time}" id="search-datetime-end" class="input-text datetimepicker-input"
                               style="width:120px;">
                        <input type="text" class="input-text" style="width:250px" value="{$nickname}" placeholder="输入会员名称" name="nickname">
                        <button type="submit" class="btn btn-success radius" id="" name=""><i class="Hui-iconfont">&#xe665;</i>
                            搜用户
                        </button>
                    </div>
                </div>
            </form>
        </div>
        <div class="panel mt-20">
            <div class="panel-body">
                <div class="clearfix">
						<span class="f-l">
							<a href="javascript:;" onclick="datadel()" class="btn btn-danger radius"><i
                                    class="Hui-iconfont">&#xe6e2;</i> 批量删除</a>
						</span>
                    <span class="f-r">共有数据：<strong>88</strong> 条</span>
                </div>
                <div class="clearfix mt-20">
                    <table class="table table-border table-bordered table-hover table-bg table-sort">
                        <thead>
                        <tr class="text-c">
                            <th width="25"><input type="checkbox" name="" value=""></th>
                            <th width="80">ID</th>
                            <th width="100">昵称</th>
                            <th width="90">剩余积分</th>
                            <th width="90">获取积分</th>
                            <th width="130">签到时间</th>
                        </tr>
                        </thead>
                        <tbody>
                        {volist name="model" id="vo"}
                        <tr class="text-c">
                            <td><input type="checkbox" value="1" name=""></td>
                            <td>{$vo.id}</td>
                            <td><u style="cursor:pointer" class="text-primary"
                                   onclick="member_show('张三','{:url(\'user/show\',[\'id\'=>$vo.user_id])}')">{$vo.nickname}</u>
                            </td>
                            <td>{$vo.integral}</td>
                            <td>{$vo.get_integral}</td>
                            <td>{$vo.create_time|date="Y-m-d H:i:s"}</td>
                        </tr>
                        {/volist}
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </article>
</div>
<!--_footer 作为公共模版分离出去-->
{include file="public/footer" /}
<!--/_footer /作为公共模版分离出去-->

<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript" src="{__STATIC_PATH}admin/lib/datatables/1.10.15/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="{__STATIC_PATH}admin/lib/laypage/1.2/laypage.js"></script>
<script type="text/javascript" src="{__STATIC_PATH}admin/static/business/js/main.js"></script>
<script type="text/javascript">
    $(function () {
        runDatetimePicker();
        $('.table-sort').dataTable({})
        // 全选 页面调用
        $(".table").HuicheckAll(
            {
                checkboxAll: 'thead input[type="checkbox"]',
                checkbox: 'tbody input[type="checkbox"]'
            },
            function (checkedInfo) {
                console.log(checkedInfo);
            }
        )
    });

    /*产品-下架*/
    function product_stop(obj, id) {
        layer.confirm('确认要封禁此用户吗？封禁时效7天', function (index) {
            $.ajax({
                url: "user/status",
                type: "post",
                data: {
                    id: id,
                    status: 2,
                },
                success: function (res) {
                    if (res.code == 1) {
                        layer.msg('已封禁', {
                            icon: 5,
                            time: 1000 //2秒关闭（如果不配置，默认是3秒）
                        }, function () {
                            //do something
                            location.reload();
                            // parent.layer.close(index);
                        });
                    } else {
                        layer.msg('封禁失败', {icon: 2, time: 1000});
                    }
                }
            })
        });
    }

    /*产品-发布*/
    function product_start(obj, id) {
        layer.confirm('确认要恢复此用户吗？', function (index) {
            $.ajax({
                url: "/user/status",
                type: "post",
                data: {
                    id: id,
                    status: 1,
                },
                success: function (res) {
                    if (res.code == 1) {
                        layer.msg('已恢复', {
                            icon: 6,
                            time: 1000 //2秒关闭（如果不配置，默认是3秒）
                        }, function () {
                            //do something
                            location.reload();
                            // parent.layer.close(index);
                        });
                    } else {
                        layer.msg('恢复失败', {icon: 2, time: 1000});
                    }
                }
            })
        });
    }

    /*产品-发布*/
    function product_del(obj, id) {
        layer.confirm('确认要封停此用户吗？', function (index) {
            $.ajax({
                url: "/admin/user/status",
                type: "post",
                data: {
                    id: id,
                    status: 3,
                },
                success: function (res) {
                    if (res.code == 1) {
                        layer.msg('已封停', {
                            icon: 6,
                            time: 1000 //2秒关闭（如果不配置，默认是3秒）
                        }, function () {
                            //do something
                            location.reload();
                            // parent.layer.close(index);
                        });
                    } else {
                        layer.msg('封停失败', {icon: 2, time: 1000});
                    }
                }
            })
        });
    }
</script>
<!--/请在上方写此页面业务相关的脚本-->
</body>
</html>
